package com.yoyoyo666.report.controller;

import com.yoyoyo666.report.common.AnnoLogin;
import com.yoyoyo666.report.mapper.ReportCorrelationUserMapper;
import com.yoyoyo666.report.mapper.ReportSendLogMapper;
import com.yoyoyo666.report.mapper.ReportUserMapper;
import com.yoyoyo666.report.model.LoginUser;
import com.yoyoyo666.report.model.ReportCorrelationUser;
import com.yoyoyo666.report.model.ReportSendLog;
import com.yoyoyo666.report.model.ReportUser;
import com.yoyoyo666.report.model.common.BaseResult;
import com.yoyoyo666.report.model.common.ListResult;
import com.yoyoyo666.report.model.common.SingletonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("log")
public class LogController {

    @Autowired
    ReportSendLogMapper logMapper;

    @PostMapping("get")
    public ListResult<ReportSendLog> get(@AnnoLogin LoginUser user){
        return ListResult.getSuccess(logMapper.selectAll(user.getCurrentUser().getId()));
    }
}
